<!DOCTYPE html>
<html xmlns:shiro="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include} :: header"></head>
<style>
    .layui-form-selectup dl {
        bottom: auto!important;
    }
    select[xm-select] + div .layui-select-title > div.xm-select{
        min-height: 30px!important;
        max-height: 30px!important;
    }
    select[xm-select] + div .layui-select-title > div.xm-select > span.xm-select-empty{
        line-height: 21px!important;
    }
</style>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
<!--        <fieldset class="table-search-fieldset">-->
<!--            <legend>搜索信息</legend>-->
<!--        </fieldset>-->
        <form class="layui-form layui-form-pane" action="">
            <input type="hidden" id="deviceId" name="deviceId" th:value="${deviceId}">
            <input type="hidden" id="deviceShowType" name="deviceShowType" th:value="${deviceShowType}">
            <input type="hidden" id="shopId" name="shopId" th:value="${shopId}">
            <input type="hidden" id="online_state" name="online_state" th:value="${online_state}">
            <input type="hidden" id="positionType" name="positionType" th:value="${positionType}">
            <input type="hidden" id="nodeId0" name="nodeId0">
            <input type="hidden" id="nodeId1" name="nodeId1">
            <input type="hidden" id="nodeId2" name="nodeId2">
            <input type="hidden" id="nodeId3" name="nodeId3">
            <input type="hidden" id="nodeId4" name="nodeId4">
            <input type="hidden" id="nodeId5" name="nodeId5">
            <input type="hidden" id="nodeId6" name="nodeId6">
            <input type="hidden" id="nodeId7" name="nodeId7">
        </form>
        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">
                <button shiro:hasPermission="module:deviceNode:add" class="layui-btn layui-btn-sm data-add-btn" lay-event="add">添加</button>
            </div>
        </script>
        <table class="layui-hide" id="exampleTable" lay-filter="currentTableFilter"></table>
        <script type="text/html" id="currentTableBar">
            <a class="layui-btn layui-btn-xs data-count-edit" shiro:hasPermission="module:deviceNode:edit" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" shiro:hasPermission="module:deviceNode:remove" lay-event="delete">删除</a>
        </script>


        <div class="row" style="overflow: scroll;height: 500px">
            <div id="divTemp0">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                    <form class="layui-form layui-form-pane" action="">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select0" xm-select-type="3" xm-select-max="10" id="feedId0" name="feedId0" class="layui-input" lay-search="" lay-filter="feedId0">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(0)">查询</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item" >
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId0" name="cfeedId0" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(0)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="ibox-tools">
                            <div class="layui-inline">
                                <label style="width: 100px;" class="layui-form-label">时间选择</label>
                                <div class="layui-input-inline" style="width:120px;">
                                    <input type="text" name="search_date" id="search_date" placeholder="请选择时间" autocomplete="off" class="layui-input" />
                                </div>
                            </div>
                            <a class="layui-btn layui-btn-xs " th:if="${positionType == 1}" onclick="exportData()">导出</a>
                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>
                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>
                            <!--                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>-->
                        </div>
                    </form>
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu0"></div>
                    </div>

                </div>
            </div>
            <div id="divTemp1" style="display: none">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select1" xm-select-type="3" xm-select-max="10" id="feedId1" name="feedId1" class="layui-input" lay-search="" lay-filter="feedId1">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(1)">查询</a>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId1" name="cfeedId1" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(1)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
<!--                        <div class="ibox-tools">-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>-->
<!--                            &lt;!&ndash;                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>&ndash;&gt;-->
<!--                        </div>-->
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu1"></div>
                    </div>
                </div>
            </div>
            <div id="divTemp2" style="display: none">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select2" xm-select-type="3" xm-select-max="10" id="feedId2" name="feedId2" class="layui-input" lay-search="" lay-filter="feedId2">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(2)">查询</a>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId2" name="cfeedId2" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(2)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
<!--                        <div class="ibox-tools">-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>-->
<!--                            &lt;!&ndash;                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>&ndash;&gt;-->
<!--                        </div>-->
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu2"></div>
                    </div>
                </div>
            </div>
            <div id="divTemp3" style="display: none">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select3" xm-select-type="3" xm-select-max="10" id="feedId3" name="feedId3" class="layui-input" lay-search="" lay-filter="feedId3">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(3)">查询</a>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId3" name="cfeedId3" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(3)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
<!--                        <div class="ibox-tools">-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>-->
<!--                            &lt;!&ndash;                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>&ndash;&gt;-->
<!--                        </div>-->
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu3"></div>
                    </div>
                </div>
            </div>
            <div id="divTemp4" style="display: none">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select4" xm-select-type="3" xm-select-max="10" id="feedId4" name="feedId4" class="layui-input" lay-search="" lay-filter="feedId4">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(4)">查询</a>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId4" name="cfeedId4" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(4)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
<!--                        <div class="ibox-tools">-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>-->
<!--                            &lt;!&ndash;                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>&ndash;&gt;-->
<!--                        </div>-->
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu4"></div>
                    </div>
                </div>
            </div>
            <div id="divTemp5" style="display: none">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select5" xm-select-type="3" xm-select-max="10" id="feedId5" name="feedId5" class="layui-input" lay-search="" lay-filter="feedId5">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(5)">查询</a>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId5" name="cfeedId5" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(5)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
<!--                        <div class="ibox-tools">-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>-->
<!--                            &lt;!&ndash;                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>&ndash;&gt;-->
<!--                        </div>-->
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu5"></div>
                    </div>
                </div>
            </div>
            <div id="divTemp6" style="display: none">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>温度曲线</h5>
                        <div style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select style="height: 30px!important" xm-select="select6" xm-select-type="3" xm-select-max="10" id="feedId6" name="feedId6" class="layui-input" lay-search="" lay-filter="feedId6">
                                            <option value="">请选择饲料</option>
                                            <th:block th:each="d : ${feedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <a class="layui-btn layui-btn-sm"  onclick="searchFeedData(6)">查询</a>
                                </div>
                            </div>
                        </div>
                        <div shiro:hasPermission="module:device:changeFeed" style="display: inline-block;margin-left: 22px" th:if="${positionType == 1}">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <select id="cfeedId6" name="cfeedId6" class="layui-input" lay-search="">
                                            <option value="">请选择要切换的饲料</option>
                                            <th:block th:each="d : ${changeFeedList}">
                                                <option th:value="${d.id}" th:text="${d.feedName}"></option>
                                            </th:block>
                                        </select>
                                    </div>
                                    <div class="layui-inline">
                                        <a class="layui-btn layui-btn-sm"  onclick="changeFeedData(6)">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
<!--                        <div class="ibox-tools">-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(0)">今日</a>-->
<!--                            <a class="layui-btn layui-btn-xs " onclick="getTemperatureRecordData(1)">7天内</a>-->
<!--                            &lt;!&ndash;                            <a class="layui-btn layui-btn-xs" onclick="getTemperatureRecordData(2)">本月</a>&ndash;&gt;-->
<!--                        </div>-->
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-wendu6"></div>
                    </div>
                </div>
            </div>
            <div id="divDianliu">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>电流曲线</h5>
                        <div class="ibox-tools">
                            <a class="layui-btn layui-btn-xs " onclick="getDianLiuRecordData(0)">今日</a>
                            <a class="layui-btn layui-btn-xs " onclick="getDianLiuRecordData(1)">7天内</a>
                            <!--                            <a class="layui-btn layui-btn-xs" onclick="getDianLiuRecordData(2)">本月</a>-->
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-line-chart-dianliu"></div>
                    </div>
                </div>
            </div>
            <div  style="height: 400px">
                <div class="ibox float-e-margins">
                    &nbsp;
                </div>
            </div>
        </div>
    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 来自bootdo的创新方案 -->
<div th:include="@{include}:: footer"></div>
<!--<script th:src="@{/js/plugins/echarts/echarts-all.js}"></script>-->
<script type="text/javascript" th:src="@{/plugins/layui/formSelects-v3.js}"></script>
<script th:src="@{/js/plugins/echarts/5.4.2/echarts.js}"></script>
<script type="text/javascript" th:src="@{/js/appjs/module/device/node/node.js}"></script>
</body>
</html>
